Conversation
…artup Zsh startup was paying for duplicate compinit work and eager loading of abbr-related plugins before the first prompt appeared. Let Sheldon own compinit, keep git-gtr completion discoverable via zstyle, defer abbr-related plugins, and only source Docker Desktop init when the script exists so interactive startup does less synchronous work.
The fzf directory picker and gwn helper assumed cd would always succeed. Returning early avoids continuing with a stale prompt state or half-finished helper flow when the target directory no longer exists or cannot be entered.
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! このプルリクエストは、Zsh の起動パフォーマンスを向上させることを目的としています。冗長な処理の削減、プラグインの遅延ロード、および条件付きスクリプト読み込みを導入することで、起動時の負荷を軽減し、より迅速なシェル環境の立ち上げを実現します。これにより、開発者の生産性向上に貢献します。 Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
home/dot_zsh.d/utils.zsh
Outdated
| fi | ||
| fi | ||
| git gtr new "$branch_name" --from "origin/$default_branch" && cd "$(git gtr go "$branch_name")" | ||
| git gtr new "$branch_name" --from "origin/$default_branch" && cd "$(git gtr go "$branch_name")" || return |
There was a problem hiding this comment.
cd "$(git gtr go "$branch_name")" の部分に潜在的なバグがあります。
git gtr go "$branch_name" が空文字列を返した場合、zshでは cd "" が cd "$HOME" と同じ挙動になり、意図せずホームディレクトリに移動してしまいます。これは予期せぬ動作を引き起こす可能性があります。
コマンドの実行結果が空でないことを確認してから cd を実行するように修正することをお勧めします。
git gtr new "$branch_name" --from "origin/$default_branch" && { local dir; dir="$(git gtr go "$branch_name")"; [ -n "$dir" ] && cd "$dir"; } || return
The gwn wrapper is no longer used anywhere in this dotfiles setup. Dropping it reduces dead shell code and removes a helper that still depended on git gtr state even though it is no longer part of the active workflow.
The Alt-b binding only launched a dedicated project helper script, and that shortcut is no longer part of the active workflow. Removing the keybind together with its script keeps the Zellij config smaller and avoids carrying an unmaintained project launcher path.
The earlier safety guard returned immediately when cd failed inside fzf-cd-widget. Resetting the prompt before returning keeps the widget behavior tidy even when the selected directory disappeared or cannot be entered.
zsh の起動が重い原因を追いやすくするため、既知の Starship による Git fetch 以外の同期処理を減らしました。
compinitを~/.zshrcと Sheldon の二重実行から 1 回に整理_git-gtrの本体sourceをやめて、必要なzstyleだけを先に定義zsh-abbrとfast-abbr-highlightingを deferred load に変更gwnヘルパーを削除fzfのディレクトリ移動でcd失敗時にそのまま続行しないよう修正計測:
origin/main:zsh -i -c exit=0.36s,0.13s,0.16scodex/zsh-startup-audit:zsh -i -c exit=0.26s,0.09s,0.09sorigin/mainのzprof:compinitが 2 回、_git-gtrが約7.69mszprof:compinitは 1 回になり、_git-gtrは起動プロファイルから消える検証:
zsh -n home/dot_zshrc home/dot_zsh.d/*.zsh home/dot_zsh.d/completions/_git-gtrrg -n "zellij-new-branch-tab|Alt b|new-branch-tab" home既知の Starship による Git fetch は今回の対象外です。
Generated by Codex (Apple Request). This PR and the commits in it were created by Codex:
0f2782f,f7cf92a,e9ea2cc,e9f69fa,d9adec8.